package site.luojie.netty.rpc.common.base;

import java.util.Arrays;

/**
 * RPC请求参数基础类
 *
 * @author jie.luo
 * @since 2020-07-07 22:57
 **/
public class NettyRpcRequest {

    /**
     * 请求ID
     */
    private String requestId;
    /**
     * 请求类
     */
    private Class<?> clazz;
    /**
     * 请求方法名
     */
    private String methodName;
    /**
     * 请求参数类型集合
     */
    private Class<?>[] parameterTypes;
    /**
     * 请求参数集合
     */
    private Object[] parameters;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public void setClazz(Class<?> clazz) {
        this.clazz = clazz;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class<?>[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class<?>[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public Object[] getParameters() {
        return parameters;
    }

    public void setParameters(Object[] parameters) {
        this.parameters = parameters;
    }

    @Override
    public String toString() {
        return "NettyRpcRequest{" +
                "requestId='" + requestId + '\'' +
                ", clazz=" + clazz +
                ", methodName='" + methodName + '\'' +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", parameters=" + Arrays.toString(parameters) +
                '}';
    }
}
